package com.cn.steam.iam.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cn.steam.iam.mapper.iam.IamRoleMappingMapper;
import com.cn.steam.iam.model.po.IamRoleMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zjm
 * @date 2021/05/07
 */
@Service
public class IamRoleService {

    @Autowired
    private IamRoleProfileService iamRoleProfileService;

    @Autowired
    private IamRoleMappingMapper iamRoleMappingMapper;

    public void deleteRole(String roleId){
        iamRoleProfileService.deleteById(roleId);
        iamRoleMappingMapper.delete(new QueryWrapper<IamRoleMapping>().eq("role_id", roleId));
    }
}
